﻿@using Microsoft.AspNetCore.Identity

<ul class="navbar-nav">
    @if (User.Identity?.IsAuthenticated ?? false)
    {
        <li class="nav-item">
            <a class="nav-link" asp-page="/Account/UserInfo">Hello @User.GetUserName()</a>
        </li>
        <li class="nav-item">
            <a class="nav-link text" asp-page="/Account/Logout">退出</a>
        </li>
    }
    else
    {
        <li class="nav-item">
            <a class="nav-link text" asp-area="" asp-page="/Account/Login">登录</a>
        </li>
    }
</ul>
